package com.test.springCloud.service;

import com.alibaba.fastjson.JSONObject;
import com.test.springCloud.utils.ResultUtils;
import com.test.springcloud.pojo.RolePojo;
import com.test.springcloud.pojo.UserPojo;

import javax.servlet.http.HttpServletRequest;

public interface UserService {
    //登录
    UserPojo login(JSONObject req);

    //注册
    int register(JSONObject req, HttpServletRequest request);

    //短信验证
    String send(JSONObject req,HttpServletRequest request)throws Exception;

    //忘记密码
    String forget(JSONObject req,HttpServletRequest request);

    //根据用户名查询
    UserPojo selectUserByName(String name);

    //查询角色信息
    RolePojo getRoleById(Integer roleId);

    //更新用户信息
    ResultUtils updateUserInfo(JSONObject req, HttpServletRequest request);
    //暂行用户登录
    UserPojo logins(JSONObject req);

    UserPojo getUserById(Integer userId);
}
